package com.mago.tis.serviceImpl;

import java.util.List;

import org.apache.log4j.Logger;

import com.mago.tis.dao.ITransportDao;
import com.mago.tis.daoImpl.TransportDao;
import com.mago.tis.pojo.Tismct;
import com.mago.tis.service.IChallanService;
import com.mago.tis.utility.ApplicationConstant;
import com.mago.tis.utility.ApplicationException;

public class ChallanService extends BaseService implements IChallanService {
	private static final Logger logger = Logger.getLogger(ChallanService.class);
	private ITransportDao transportDao;

	public ChallanService() {
		transportDao = new TransportDao();
	}

	/**
	 * Method to load the first challan data
	 */
	public List<Tismct> loadChallan1Data(String ids)
			throws ApplicationException {
		List<Tismct> masterDataList = null;
		try {
			masterDataList = transportDao.getChallan1Data(ids);
		} catch (ApplicationException ae) {
			throw ae;
		} catch (Exception e) {
			logger.error("ChallanService --->loadChallan1Data():"
					+ e.getMessage());
			throw new ApplicationException(
					ApplicationConstant.CHALLAN_1_DATA_FETCH_ERROR);
		}
		return masterDataList;
	}
}
